// IpAddress.h: interface for the CIpAddress class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IPADDRESS_H__E4F31619_AD01_416C_8282_42DCD15EDF75__INCLUDED_)
#define AFX_IPADDRESS_H__E4F31619_AD01_416C_8282_42DCD15EDF75__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CIpAddress : public sockaddr
{
public:
	CIpAddress(BYTE b1 = 0, BYTE b2 = 0, BYTE b3 = 0, BYTE b4 = 0, WORD wPort = 0);
	CIpAddress(DWORD dwAddr, WORD wPort = 0);
	CIpAddress(LPCTSTR sIpAddr);

	operator sockaddr*(){return this;}
	operator sockaddr_in*(){return (sockaddr_in*)this;}

	CString ToString();
	CString AddrToString();
	BOOL CompareTo(CIpAddress& i);
};

#endif // !defined(AFX_IPADDRESS_H__E4F31619_AD01_416C_8282_42DCD15EDF75__INCLUDED_)
